<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>@yield('title', 'LaraBBS') - {{ setting('site_name', 'Laravel 进阶教程') }}</title>
    <meta name="description" content="@yield('description', setting('seo_description', 'LaraBBS 爱好者社区。'))"/>
    <meta name="keyword" content="@yield('keyword', setting('seo_keyword', 'LaraBBS,社区,论坛,开发者论坛'))"/>

    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">
    <link href="{{ asset('packages/summerblue/administrator/js/sweetalert/sweetalert.css') }}" rel="stylesheet">
@yield('styles')
<!-- Scripts -->
    <script>
        window.Laravel = <?php echo json_encode([
            'csrfToken' => csrf_token(),
        ]); ?>;
        Laravel.apiToken = "{{Auth::check()?'Bearer '.user()->api_token:'Bearer '}}";
        @if(Auth::check())
            window.LarabelBBS = {
            name: "{{user()->name}}",
            avatar: "{{user()->avatar}}"
        }
        @endif
    </script>

</head>

<body>
<div id="app" class="{{ route_class() }}-page">

    @include('layouts._header')

    <div class="container">

        @include('layouts._message')

        @yield('content')

    </div>
    @if(!if_route('host'))
        @include('layouts._footer')
    @endif
</div>

@if (app()->isLocal())
    @include('sudosu::user-selector')
@endif

<!-- Scripts -->
<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('packages/summerblue/administrator/js/sweetalert/sweetalert.min.js') }}"></script>
<script>
    $(function () {
        // $('div.alert').not('.alert-important').not('.no-close').delay(3000).fadeOut(350);
        $('#flash-overlay-modal').modal();
    });
</script>
@yield('scripts')

@include('sweet::alert')
</body>
</html>